﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using VOL.Core.Utilities;
using VOL.Team.TeamIServices.SmartLargeScreenManagement.IServices;
using VOL.Team.TeamIServices.TeamManagement.IServices;

namespace VOL.WebApi.Controllers.Team.sj
{
    /// <summary>
    /// 智慧大屏控制器
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class SmartLargeScreenController : ControllerBase
    {
        private readonly ISmartLargeScreenService _smartLargeScreenService;
        private readonly IDailyPlanService _dailyPlanService;

        public SmartLargeScreenController(ISmartLargeScreenService smartLargeScreenService, IDailyPlanService dailyPlanService)
        {
            this._smartLargeScreenService = smartLargeScreenService;
            this._dailyPlanService = dailyPlanService;
        }
        /// <summary>
        /// 查询班组台账
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public WebResponseContent GetTeamledger()
        {
            WebResponseContent webResponseContent = new WebResponseContent();
            var teamledgerList = _smartLargeScreenService.GetTeamledger();
            return webResponseContent.OK("查询班组台账成功", teamledgerList);
        }

        /// <summary>
        /// 查询每日计划
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public WebResponseContent GetDailyPlan()
        {
            WebResponseContent webResponseContent = new WebResponseContent();
            var dailyplanList = _dailyPlanService.GetDailyPlan();
            return webResponseContent.OK("查询每日计划成功", dailyplanList);
        }
    }
}
